<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jstl/core">

    <body>

        <ui:composition template="./templates/template.xhtml">

            <ui:define name="content">
                <div class="content-center">
                    <c:if test="#{LoginManager.verificaLogado}">
                        <h:form>
                            <h:messages />
                            <h:panelGrid columns="2" style="width:300px;">
                                <h:outputText value="Assunto:" />
                                <h:inputText class="input" value="#{MensagemMB.mensagem.assunto}" />
                                <h:outputText value="Mensagem:" />
                                <h:inputTextarea class="input" style="height:200px;" value="#{MensagemMB.mensagem.texto}" />
                            </h:panelGrid>
                            <h:commandButton style="margin-left:300px;" value="enviar" action="#{MensagemMB.enviarMensagem}" />
                        </h:form>
                    </c:if>

                    <c:if test="#{!LoginManager.verificaLogado}">
                        <h:outputText value="Voce precisa estar logado para utilizar esta função." />
                    </c:if>
                </div>
            </ui:define>

        </ui:composition>

    </body>
</html>
